// routers.js
export function router(url: string) {
  const token = wx.getStorageSync('token');
  if (token && token.length > 0) {
    wx.redirectTo({
      url: url
    })
  } else {
    wx.redirectTo({
      url: '/pages/login/login'
    })
  }
}
